{"ast":null,"code":"import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"cols\", \"component\", \"rows\", \"style\"];\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { integerPropType } from '@mui/utils';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport ImageListContext from '../ImageList/ImageListContext';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport isMuiElement from '../utils/isMuiElement';\nimport imageListItemClasses, { getImageListItemUtilityClass } from './imageListItemClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes,\n    variant\n  } = ownerState;\n  const slots = {\n    root: ['root', variant],\n    img: ['img']\n  };\n  return composeClasses(slots, getImageListItemUtilityClass, classes);\n};\nconst ImageListItemRoot = styled('li', {\n  name: 'MuiImageListItem',\n  slot: 'Root',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [{\n      [`& .${imageListItemClasses.img}`]: styles.img\n    }, styles.root, styles[ownerState.variant]];\n  }\n})(_ref => {\n  let {\n    ownerState\n  } = _ref;\n  return _extends({\n    display: 'block',\n    position: 'relative'\n  }, ownerState.variant === 'standard' && {\n    // For titlebar under list item\n    display: 'flex',\n    flexDirection: 'column'\n  }, ownerState.variant === 'woven' && {\n    height: '100%',\n    alignSelf: 'center',\n    '&:nth-of-type(even)': {\n      height: '70%'\n    }\n  }, {\n    [`& .${imageListItemClasses.img}`]: _extends({\n      objectFit: 'cover',\n      width: '100%',\n      height: '100%',\n      display: 'block'\n    }, ownerState.variant === 'standard' && {\n      height: 'auto',\n      flexGrow: 1\n    })\n  });\n});\nconst ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inProps, ref) {\n  const props = useThemeProps({\n    props: inProps,\n    name: 'MuiImageListItem'\n  });\n\n  // TODO: - Use jsdoc @default?: \"cols rows default values are for docs only\"\n  const {\n      children,\n      className,\n      cols = 1,\n      component = 'li',\n      rows = 1,\n      style\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const {\n    rowHeight = 'auto',\n    gap,\n    variant\n  } = React.useContext(ImageListContext);\n  let height = 'auto';\n  if (variant === 'woven') {\n    height = undefined;\n  } else if (rowHeight !== 'auto') {\n    height = rowHeight * rows + gap * (rows - 1);\n  }\n  const ownerState = _extends({}, props, {\n    cols,\n    component,\n    gap,\n    rowHeight,\n    rows,\n    variant\n  });\n  const classes = useUtilityClasses(ownerState);\n  return /*#__PURE__*/_jsx(ImageListItemRoot, _extends({\n    as: component,\n    className: clsx(classes.root, classes[variant], className),\n    ref: ref,\n    style: _extends({\n      height,\n      gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,\n      gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,\n      marginBottom: variant === 'masonry' ? gap : undefined\n    }, style),\n    ownerState: ownerState\n  }, other, {\n    children: React.Children.map(children, child => {\n      if (! /*#__PURE__*/React.isValidElement(child)) {\n        return null;\n      }\n      if (process.env.NODE_ENV !== 'production') {\n        if (isFragment(child)) {\n          console.error([\"MUI: The ImageListItem component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n        }\n      }\n      if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n        return /*#__PURE__*/React.cloneElement(child, {\n          className: clsx(classes.img, child.props.className)\n        });\n      }\n      return child;\n    })\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes /* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n  /**\n   * The content of the component, normally an `<img>`.\n   */\n  children: PropTypes.node,\n  /**\n   * Override or extend the styles applied to the component.\n   */\n  classes: PropTypes.object,\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * Width of the item in number of grid columns.\n   * @default 1\n   */\n  cols: integerPropType,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * Height of the item in number of grid rows.\n   * @default 1\n   */\n  rows: integerPropType,\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n  /**\n   * The system prop that allows defining system overrides as well as additional CSS styles.\n   */\n  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ImageListItem;","map":{"version":3,"names":["_objectWithoutPropertiesLoose","_extends","_excluded","unstable_composeClasses","composeClasses","integerPropType","clsx","PropTypes","React","isFragment","ImageListContext","styled","useThemeProps","isMuiElement","imageListItemClasses","getImageListItemUtilityClass","jsx","_jsx","useUtilityClasses","ownerState","classes","variant","slots","root","img","ImageListItemRoot","name","slot","overridesResolver","props","styles","display","position","flexDirection","height","alignSelf","objectFit","width","flexGrow","ImageListItem","forwardRef","inProps","ref","children","className","cols","component","rows","style","other","rowHeight","gap","useContext","undefined","as","gridColumnEnd","gridRowEnd","marginBottom","Children","map","child","isValidElement","process","env","NODE_ENV","console","error","join","type","cloneElement","propTypes","node","object","string","elementType","sx","oneOfType","arrayOf","func","bool"],"sources":["/data/messenger.client/node_modules/@mui/material/esm/ImageListItem/ImageListItem.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"cols\", \"component\", \"rows\", \"style\"];\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { integerPropType } from '@mui/utils';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport ImageListContext from '../ImageList/ImageListContext';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport isMuiElement from '../utils/isMuiElement';\nimport imageListItemClasses, { getImageListItemUtilityClass } from './imageListItemClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n  const {\n    classes,\n    variant\n  } = ownerState;\n  const slots = {\n    root: ['root', variant],\n    img: ['img']\n  };\n  return composeClasses(slots, getImageListItemUtilityClass, classes);\n};\nconst ImageListItemRoot = styled('li', {\n  name: 'MuiImageListItem',\n  slot: 'Root',\n  overridesResolver: (props, styles) => {\n    const {\n      ownerState\n    } = props;\n    return [{\n      [`& .${imageListItemClasses.img}`]: styles.img\n    }, styles.root, styles[ownerState.variant]];\n  }\n})(({\n  ownerState\n}) => _extends({\n  display: 'block',\n  position: 'relative'\n}, ownerState.variant === 'standard' && {\n  // For titlebar under list item\n  display: 'flex',\n  flexDirection: 'column'\n}, ownerState.variant === 'woven' && {\n  height: '100%',\n  alignSelf: 'center',\n  '&:nth-of-type(even)': {\n    height: '70%'\n  }\n}, {\n  [`& .${imageListItemClasses.img}`]: _extends({\n    objectFit: 'cover',\n    width: '100%',\n    height: '100%',\n    display: 'block'\n  }, ownerState.variant === 'standard' && {\n    height: 'auto',\n    flexGrow: 1\n  })\n}));\nconst ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inProps, ref) {\n  const props = useThemeProps({\n    props: inProps,\n    name: 'MuiImageListItem'\n  });\n\n  // TODO: - Use jsdoc @default?: \"cols rows default values are for docs only\"\n  const {\n      children,\n      className,\n      cols = 1,\n      component = 'li',\n      rows = 1,\n      style\n    } = props,\n    other = _objectWithoutPropertiesLoose(props, _excluded);\n  const {\n    rowHeight = 'auto',\n    gap,\n    variant\n  } = React.useContext(ImageListContext);\n  let height = 'auto';\n  if (variant === 'woven') {\n    height = undefined;\n  } else if (rowHeight !== 'auto') {\n    height = rowHeight * rows + gap * (rows - 1);\n  }\n  const ownerState = _extends({}, props, {\n    cols,\n    component,\n    gap,\n    rowHeight,\n    rows,\n    variant\n  });\n  const classes = useUtilityClasses(ownerState);\n  return /*#__PURE__*/_jsx(ImageListItemRoot, _extends({\n    as: component,\n    className: clsx(classes.root, classes[variant], className),\n    ref: ref,\n    style: _extends({\n      height,\n      gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,\n      gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,\n      marginBottom: variant === 'masonry' ? gap : undefined\n    }, style),\n    ownerState: ownerState\n  }, other, {\n    children: React.Children.map(children, child => {\n      if (! /*#__PURE__*/React.isValidElement(child)) {\n        return null;\n      }\n      if (process.env.NODE_ENV !== 'production') {\n        if (isFragment(child)) {\n          console.error([\"MUI: The ImageListItem component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n        }\n      }\n      if (child.type === 'img' || isMuiElement(child, ['Image'])) {\n        return /*#__PURE__*/React.cloneElement(child, {\n          className: clsx(classes.img, child.props.className)\n        });\n      }\n      return child;\n    })\n  }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ImageListItem.propTypes /* remove-proptypes */ = {\n  // ----------------------------- Warning --------------------------------\n  // | These PropTypes are generated from the TypeScript type definitions |\n  // |     To update them edit the d.ts file and run \"yarn proptypes\"     |\n  // ----------------------------------------------------------------------\n  /**\n   * The content of the component, normally an `<img>`.\n   */\n  children: PropTypes.node,\n  /**\n   * Override or extend the styles applied to the component.\n   */\n  classes: PropTypes.object,\n  /**\n   * @ignore\n   */\n  className: PropTypes.string,\n  /**\n   * Width of the item in number of grid columns.\n   * @default 1\n   */\n  cols: integerPropType,\n  /**\n   * The component used for the root node.\n   * Either a string to use a HTML element or a component.\n   */\n  component: PropTypes.elementType,\n  /**\n   * Height of the item in number of grid rows.\n   * @default 1\n   */\n  rows: integerPropType,\n  /**\n   * @ignore\n   */\n  style: PropTypes.object,\n  /**\n   * The system prop that allows defining system overrides as well as additional CSS styles.\n   */\n  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ImageListItem;"],"mappings":"AAAA,OAAOA,6BAA6B,MAAM,yDAAyD;AACnG,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,MAAMC,SAAS,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC;AACjF,SAASC,uBAAuB,IAAIC,cAAc,QAAQ,WAAW;AACrE,SAASC,eAAe,QAAQ,YAAY;AAC5C,OAAOC,IAAI,MAAM,MAAM;AACvB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,UAAU;AACrC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,YAAY,MAAM,uBAAuB;AAChD,OAAOC,oBAAoB,IAAIC,4BAA4B,QAAQ,wBAAwB;AAC3F,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,MAAMC,iBAAiB,GAAGC,UAAU,IAAI;EACtC,MAAM;IACJC,OAAO;IACPC;EACF,CAAC,GAAGF,UAAU;EACd,MAAMG,KAAK,GAAG;IACZC,IAAI,EAAE,CAAC,MAAM,EAAEF,OAAO,CAAC;IACvBG,GAAG,EAAE,CAAC,KAAK;EACb,CAAC;EACD,OAAOpB,cAAc,CAACkB,KAAK,EAAEP,4BAA4B,EAAEK,OAAO,CAAC;AACrE,CAAC;AACD,MAAMK,iBAAiB,GAAGd,MAAM,CAAC,IAAI,EAAE;EACrCe,IAAI,EAAE,kBAAkB;EACxBC,IAAI,EAAE,MAAM;EACZC,iBAAiB,EAAE,CAACC,KAAK,EAAEC,MAAM,KAAK;IACpC,MAAM;MACJX;IACF,CAAC,GA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